<SCRIPT src="/js/jquery.js" type="text/javascript"></SCRIPT>
<SCRIPT src="/js/Gettext.js" type="text/javascript"></SCRIPT>
<SCRIPT src="/locale/<!--TPL:$user->lang-->/LC_MESSAGES/musdb.js.json" language="javascript"></SCRIPT>
<SCRIPT src="/js/watch.js" type="text/javascript"></SCRIPT>
<SCRIPT src="/js/leaked.js" type="text/javascript"></SCRIPT>
<TABLE class="commit_table" width="100%" align="center" cellspacing="5" cellpadding="0">
    <TR>
        <TD width="100%" class="commit_caption">
            <TABLE border="0">
                <TR>
                    <TD  nowrap align="left" width="100%">
                        &nbsp;<!--TPL:"Release details"|gettext-->
                    </TD>
                </TR>
            </TABLE>
        </TD>
    </TR>

    <TR>
        <TD>
            <TABLE cellpadding="25" cellspacing="0" border="0">
                <TR>
                    <TD>
                        <div style="text-align: center;">
                                <!--TPL:if $release->picture_path -->
                                <img src="<!--TPL:$release->picture_path-->" style="border: 0px;" alt="<!--TPL:$release->name-->">
                                <!--TPL:else-->
                                <a class="edit_link" href="/?cat=edit_release&id=<!--TPL:$release->id-->&col=picture" style="display: inline;"><!--TPL:"Upload picture"|gettext--></a>
                                <!--TPL:/if-->
                        </div>
                    </TD>
                    <TD>

                        <div style="position: relative; left: -21px;">
                        <div class="release_title">
                            <!--TPL:$release->name-->
                            <!--TPL:if $release->leaked-->
                                &nbsp;
                                <a class="leak" target="_blank" href="http://thepiratebay.org/search/<!--TPL:$release->name-->/0/99/101" title="<!--TPL:"Leaked!"|gettext-->">
                                        <!--TPL:"leaked"|gettext-->&nbsp;<img border="0" src="/img/leaked.png" alt="<!--TPL:"Leaked!"|gettext-->" style="height: auto;">
                                </a>
                            <!--TPL:else-->

                            <!--TPL:/if-->

                            <br><small>by <a href="/artist/<!--TPL:$release->artist_name|wrapArtistLink-->"><!--TPL:$release->artist_name--></a></small></div><BR>

                        <div class="release_data_title">
                            <!--TPL:"Release date"|gettext-->:
                            <span class="release_data">
                            <!--TPL:if $release->release_date-->
                            <!--TPL:$release->release_date-->
                            <!--TPL:elseif $release->year_finished-->
                            <!--TPL:$release->year_finished-->
                            <!--TPL:elseif $release->schedule_date-->
                            <!--TPL:$release->schedule_date-->
                            <!--TPL:else-->
                            <a class="edit_link" href="/?cat=edit_release&id=<!--TPL:$release->id-->&col=release_date" style="display: inline;"><!--TPL:"Set release date"|gettext--></a>
                            <!--TPL:/if-->
                            </span>
                        </div>

                        <div class="release_data_title">
                            <!--TPL:"Recording label"|gettext-->:
                            <span class="release_data">
                            <!--TPL:if $release->label_name-->
                            <!--TPL:$release->label_name-->
                            <!--TPL:else-->
                            <a class="edit_link" href="/?cat=edit_release&id=<!--TPL:$release->id-->&col=label" style="display: inline;"><!--TPL:"Set recording label"|gettext--></a>
                            <!--TPL:/if-->
                            </span>
                        </div>


                        <div class="release_data_title">
                            <!--TPL:"Record type"|gettext-->:
                            <span class="release_data">
                            <!--TPL:if $release->record_type-->
                            <!--TPL:$release->record_type-->
                            <!--TPL:else-->
                            <a class="edit_link" href="/?cat=edit_release&id=<!--TPL:$release->id-->&col=recordtype" style="display: inline;"><!--TPL:"Set record type"|gettext--></a>
                            <!--TPL:/if-->
                            </span>
                        </div>

                        <div class="release_data_title">
                            <!--TPL:"Track count"|gettext-->:
                            <span class="release_data">
                            <!--TPL:if $release->track_count-->
                            <!--TPL:$release->track_count-->
                            <!--TPL:else-->
                            <a class="edit_link" href="/?cat=edit_release&id=<!--TPL:$release->id-->&col=trackcount" style="display: inline;"><!--TPL:"Set track count"|gettext--></a>
                            <!--TPL:/if-->
                            </span>
                        </div>

                        <div class="release_data_title">
                            <!--TPL:"Length"|gettext-->:
                            <span class="release_data">
                            <!--TPL:if $release->length-->
                            <!--TPL:$release->length|get_album_length-->
                            <!--TPL:else-->
                            <a class="edit_link" href="/?cat=edit_release&id=<!--TPL:$relase->id-->&col=trackcount" style="display: inline;"><!--TPL:"Set length"|gettext--></a>
                            <!--TPL:/if-->
                            </span>
                        </div>

                    </TD>
                </TR>
            </TABLE>
        </TD>
    </TR>

    <TR>
        <TD align="left">
            <h2><!--TPL:"Description"|gettext--></h2>
        </TD>
    </TR>
    <TR>
        <TD align="left">
            <!--TPL:if $release->wiki-->
            <span class="wiki_data"><!--TPL:$release->wiki--></span>
            <!--TPL:else-->
            <span class="wiki_data"><!--TPL:"No wiki."|gettext--> </span><a class="edit_link" href="/?cat=edit_release&id=<!--TPL:$release->id-->&col=wiki" style="display: inline;"><!--TPL:"Care to help?"|gettext--></a>
            <!--TPL:/if-->
        </TD>
    </TR>

    <!--TPL:if $user->access >= 0 || $user->id != 0-->
    <TR>
        <TD align="left">
            <!--TPL:if $user->id != 0-->
                <!--TPL:if !$watched-->
                <div style="float:left;" id="quick_watch">
                    <input id="qwatch_button" type="button" value="<!--TPL:"Watch release"|gettext-->" onclick="quickWatchRelease('<!--TPL:$release->id-->'); return false;">
                </div>
                <!--TPL:else-->
                <div style="float:left;" id="quick_watch">
                    <input id="qunwatch_button" type="button" value="<!--TPL:"Unwatch release"|gettext-->" onclick="quickUnwatchRelease('<!--TPL:$release->id-->'); return false;">
                </div>
                <!--TPL:/if-->
            <!--TPL:/if-->
            <!--TPL:if !$release->leaked && $user->access >= 0-->
            <div style="float: left;" id="quick_leaked">
                <input id="qleaked_button" type="button" value="<!--TPL:"Mark as leaked"|gettext-->" onclick="quickLeakedRelease('<!--TPL:$release->id-->'); return false;">
            </div>
            <!--TPL:/if-->
            <!--TPL:if $release->leaked && $user->access >= 0-->
            <div style="float: left;" id="quick_unleaked">
                <input id="qunleaked_button" type="button" value="<!--TPL:"Mark as not leaked"|gettext-->" onclick="quickUnleakedRelease('<!--TPL:$release->id-->'); return false;">
            </div>
            <!--TPL:/if-->
            <!--TPL:if $user->access >= 0 -->
            <div style="float:right;">
                <input type="button" value="<!--TPL:"Edit release"|gettext-->" onclick="window.location='/edit_release?id=<!--TPL:$release->id-->';">
                <!--TPL:if $user->access >= 2 -->
                    <input type="button" value="<!--TPL:"Delete release"|gettext-->" onclick="window.location='/delete_release?id=<!--TPL:$release->id-->';">
                <!--TPL:/if-->
            </div>
            <!--TPL:/if-->
        </TD>
    </TR>
    <!--TPL:/if-->
</TABLE>

<BR>
<!--TPL:*-->
<a name="comments"></a>
    <TABLE class="commit_table" width="100%" align="center" cellspacing="5" cellpadding="0">
	<TR>
	    <TD width="100%" class="commit_caption">
		<TABLE border="0">
		    <TR>
			<TD nowrap align="left" width="100%">
			    &nbsp;Comments
			</TD>
		    </TR>
		</TABLE>
	    </TD>
	</TR>

        <TR>
            <TD>
        <!--TPL:foreach name=outer from=$comments item=item-->
        <!--TPL:if $smarty.foreach.outer.first-->
                <TABLE border="0" cellspacing="20" cellpadding="0" width="100%">
        <!--TPL:/if-->
                    <TR>
                        <TD>
                            <TABLE border="0" cellspacing="5" cellpadding="0" align="center">
                                <TR>
                                    <TD align="left" nowrap width="64px" class="comment_title">
                                        <strong>
                                            <!--TPL:if $item.user_name-->
                                            <!--TPL:$item.user_name-->
                                            <!--TPL:else-->
                                            Anonymous
                                            <!--TPL:/if-->
                                        </strong>
                                    </TD>
                                    <TD align="right" nowrap class="comment_title">
                                        <span class="comment_date"><!--TPL:$item.date_added--></span>
                                    </TD>
                                </TR>
                                <TR>
                                    <TD class="comment_pic" width="64"  valign="top">
                                        <div class="badge">
                                            <!--TPL:if !$item.picture_path-->
                                            <img class="userpic" alt="<!--TPL:$item.user_name-->" src="/img/no_userpic.jpg">
                                            <!--TPL:else-->
                                            <img class="userpic" alt="<!--TPL:$item.user_name-->" src="<!--TPL:$item.picture_path-->">
                                            <!--TPL:/if-->
                                        </div>
                                    </TD>
                                    <TD class="comment" valign="top" width="400px">
                                        <div style="overflow: auto; width:400px;">
                                        <!--TPL:$item.message-->
                                        </div>
                                    </TD>
                                </TR>
                            </TABLE>
                        </TD>
                    </TR>
       <!--TPL:if $smarty.foreach.outer.last-->
                </TABLE>
       <!--TPL:/if-->
       <!--TPL:foreachelse-->
            <span class="wiki_data">No comments yet.</span>
       <!--TPL:/foreach-->
            </TD>
        </TR>
    </TABLE>

<BR>

    <!--TPL:if $user->access >= 0-->
    <TABLE class="commit_table" width="100%" align="center" cellspacing="5" cellpadding="0">
	<TR>
	    <TD width="100%" class="commit_caption">
		<TABLE border="0">
		    <TR>
			<TD nowrap align="left" width="100%">
			    &nbsp;Add new comment
			</TD>
		    </TR>
		</TABLE>
	    </TD>
	</TR>

        <TR>
            <TD width="100%" nowrap>
                <FORM method="post" action="/?cat=comment_release">
                    <TABLE border="0" cellspacing="5" cellpadding="0" align="center">
                        <TR>
                            <TD class="commit_label" nowrap align="right">
                                Message:
                            </TD>
                            <TD nowrap align="left">
                                <input type="hidden" name="release_name" id="release_name" value="<!--TPL:$release->name-->">
                                <input type="hidden" name="release_id" id="release_id" value="<!--TPL:$release->id-->">
                                <textarea cols="1" rows="1" name="message" id="message" class="flat" style="width: 400px; height: 64px;"></textarea>
                            </TD>
                        </TR>

                        <TR>
                            <TD class="commit_label" nowrap align="right">

                            </TD>
                            <TD align="center">
                                <input type="submit" class="submit" value="Add comment">
                                <!--TPL:if $user->id == 0 -->
                                <small>You are not logged in. Comment will be added <strong>anonymously</strong>.</small>
                                <!--TPL:/if-->
                            </TD>
                        </TR>
                    </TABLE>
                </FORM>
            </TD>
        </TR>
    </TABLE>
    <!--TPL:/if-->


<!--TPL:*-->